package c_lockproducer;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

/*
    共享资源类
 */
public class Resource {
    public static int count;

    //标记当前状态
    public static boolean flag; //false

    //Lock接口的实现对象
    public static ReentrantLock lock = new ReentrantLock();
    //生产者阻塞队列
    public static final Condition pro = lock.newCondition();
    //消费者阻塞队列
    public static final Condition cust = lock.newCondition();
}
